From: Daniel van Vugt Date: Wed, 15 Jul 2026 10:44:06 +0000 (+0800) Subject: magnifier: Avoid applying monitor scaling factors to the cursor twice X-Git-Tag: archive/raspbian/50.5-1+rpi1^2~9^2^2~11 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a9c5bdf9a50ea3a0b30337e01265474ceba32f7f;p=gnome-shell.git magnifier: Avoid applying monitor scaling factors to the cursor twice The mouse actor needs special consideration because it is not a child of the _uiGroupClone being magnified. So it gets magnified separately *and* already has its own scaling factor from the source actor (actually from the display scaling factor). Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/9302 Part-of: (cherry picked from commit b258fed0671d0f73a0308d42ab0af820dfab62cf) --- diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index c6e3d49fc..9da1f7776 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -1792,11 +1792,12 @@ class ZoomRegion { }); const [mouseX, mouseY] = this._getMousePosition(); + const sourceMouseScale = this._mouseSourceActor.get_resource_scale(); this._mouseActor.ease({ x: mouseX, y: mouseY, - scale_x: this._xMagFactor, - scale_y: this._yMagFactor, + scale_x: this._xMagFactor / sourceMouseScale, + scale_y: this._yMagFactor / sourceMouseScale, mode: Clutter.AnimationMode.EASE_OUT_QUAD, duration: animate ? 100 : 0, });